<h1>Listing devices</h1>
<% for device in @devices %>
<div id="device">
	<div id="title"><%=h device.name %></div>
    <div id="desc"><%=h truncate(device.desc,80) %></div>
    <div id="stats">Features:<%=h device.features.count %> out of <%=h device.size.max_features %></div>
	<div id="cost">Market Value:<%=h device.cmv.round(2)%>GP</div>
	<div id="footer">|<%= link_to 'Show', device %>|<%= link_to 'Edit', edit_device_path(device) %>|<%= link_to 'Destroy', device, :confirm => 'Are you sure?', :method => :delete %>|</div>
</div><br>
<% end %>
<%= link_to 'New device', new_device_path %>
